$(document).ready(function(){
	$("body").show();
});

$(document).on('click', '#btnReset', function(e){
	$("#userName").val("");
	$("#password").val("");
});

$(document).on('click', '#btnRagirset', function(e){
	$.ajax({
		 url: "loginRagistration?r="+Math.random(),
	     type: "POST",
	     data: {
	    	 "userName":$("#userName").val(),
	    	 "password":$("#password").val(),
	    },
	     success: function(data){
	    	 data = $.trim(data);
	    	 if(data == "savedSuccess"){
	    		 $("#detailTD").empty();
	    		 $("#detailTD").append("<br>User registered successfully");
	    		 
	    		 
	    		 
	    		 window.location = "satvik_login.html";
	    		 
	    		// window.location = "satvik_index.html";
	    	 }else if(data == "UserExsit"){
	    		 $("#detailTD").empty();
	    		 $("#detailTD").append("<br>Sorry user allready Exist");
	    	 }else{
	    		 $("#detailTD").empty();
	    		 $("#detailTD").append("<br>Username or Password Is invalid !!!!.  Please try again");
	    	 }
	     },
	     error: function () {
	    	 console.log("here error");
	    	// sessionStorage.setItem("userlogin"+origCompId,"");
	     },async:false,
		
	});
});